package com.entity;

import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 【车辆管理】 每日里程更新
 */

@Entity
@Table(name = "daily_mileage")
@Getter @Setter @NoArgsConstructor
public class VehicleDailyMileage extends BaseEntity {

    private String plateNumber;

    @Column(name = "record_date")
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date recordDate;

    // 总里程数
    @Column(name = "odometer", precision = 10, scale = 2)
    private BigDecimal odometer;

    // 日里程数
    @Column(name = "daily_mileage",  precision = 10, scale = 2)
    private BigDecimal dailyMileage;

    @Column(name = "remark", length = 200)
    private String remark;

}